
import { $post, $get, $fileDownLoad2 } from '@/api/request'
let basic = '/basic'
export const getSchoolDistrictList = () => {
  return $post({
    url: `${basic}/district/queryDistrictListBySchoolNo`
  })
}
export const getGradeList = data => {
  return $post({
    url: `${basic}/sepGradeInfo/query`,
    data
  })
}
export const getclassesList = data => {
  return $post({
    url: `${basic}/classes/query`,
    data
  })
}
// 防疫宝-人员基础信息学生信息查询
export const queryStudentByCondition = data => {
  return $post({
    url: `${basic}/sepStudentInfo/feign/queryStudentByCondition`,
    data: {
      classNo: '',
      gradeNo: '',
      status: '',
      ...data
    }
  })
}
// 查询教职工信息列表
export function getTeacherInfo (data) {
  return $post({
    url: `${basic}/sepTeacherInfo/query/page`,
    data
  })
}
// 查询学校信息
export function getAllList () {
  return $get({
    url: `${basic}/school/getAllList`
  })
}
// 查询学生核酸码列表
export function queryNucleicCodeStudentList (data) {
  return $post({
    url: `${basic}/sepStudentInfo/queryNucleicCodeStudentList`,
    data
  })
}
// 查询教师核酸码列表
export function queryNucleicCodeTeacherList (data) {
  return $post({
    url: `${basic}/sepTeacherInfo/queryNucleicCodeTeacherList`,
    data
  })
}
// 导出教师核酸码列表
export function exportNucleicCodeTeacherList (data) {
  return $fileDownLoad2({
    url: `${basic}/sepTeacherInfo/exportNucleicCodeTeacherList`,
    method: 'post',
    filename: '教职工核酸码信息.zip',
    data
  })
}
// 导出学生核酸码列表
export function exportNucleicCodeStudentList (data) {
  return $fileDownLoad2({
    url: `${basic}/sepStudentInfo/exportNucleicCodeStudentList`,
    method: 'post',
    filename: '学生核酸码信息.zip',
    data
  })
}

// 查询个人健康记录
export function getHealthInfoByNo (data) {
  // 后端取值方式为get 请求方式post 我吐了。。
  return $post({
    url: `${basic}/sepTeacherInfo/getHealthInfoByNo?idCard=${data.idCard}&no=${data.no}`,
    data
  })
}
// 导出学生码
export function exportStudentZip (data) {
  return $fileDownLoad2({
    url: `${basic}/sepStudentInfo/exportStudentZip`,
    method: 'post',
    filename: '学生码信息.zip',
    data
  })
}
// 导出教职工码
export function exportTeacherZip (data) {
  return $fileDownLoad2({
    url: `${basic}/sepTeacherInfo/exportTeacherZip`,
    method: 'post',
    filename: '教职工码信息.zip',
    data
  })
}
// 手动发送通知
export function manualNotice (data) {
  return $post({
    url: `${basic}/sepStudentInfo/manualNotice`,
    data
  })
}
